{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "3ac58394-401f-45b2-a9db-dd48938a21c9",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入包\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "from matplotlib import ticker"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ef35a569-0c72-4748-8f88-5d07f5c8b17b",
   "metadata": {},
   "source": [
    "## Axis对象\n",
    "1. Axis对象是Matplotlib中的坐标轴容器对象（例如，x轴或y轴）\n",
    "2. Axis对象作为容器含有一系列对象：\n",
    "    1. Tick对象（刻度）\n",
    "    2. TickLabel对象（刻度文本）\n",
    "    3. AxisLabel对象（坐标轴文本）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "854b882b-6019-48a9-b5e5-7c953cb0151e",
   "metadata": {},
   "source": [
    "## 一、设置坐标轴label的位置"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "ced0684d-db47-4a1a-a016-ea882e0c7fcd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAD4CAYAAAD2FnFTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAARN0lEQVR4nO3df+xddX3H8efLAhFExq9vm0phXzWEScgA/QZRFjeoLBgcJQsQSHSdsnXJ1KG4aGXLEt0Su2wxOrds60Cpk6kMQZjgD1KFbcygX34oYEGUVWTW9isiMMyAwnt/3NPwBU/b2+177rl87/ORNOecz72X87qB9MXn3HM/N1WFJEnP9YK+A0iSxpMFIUlqZUFIklpZEJKkVhaEJKnVXn0HWEiHHnpoTU9P9x1Dkp43brnllh9X1VTbY4uqIKanp5mdne07hiQ9byT5/s4e8xKTJKnVUAWR5BeTvL7Z3zfJi7uNJUnq224LIsnvAlcAf98MrQA+12E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Ko3A+cmGS/5r/5lUzAh/M7M7ZLbYyr58ESIF05CXgzcEeS25uxi6rquv4iqWPvAC5r/kfoPuAtPefpXFXdnOQK4FYGd+7dxgQvueFSG5KkVl5ikiS1siAkSa0sCElSKwtCktTKgpAktbIgJEmtLAhJUqv/BYxEdZLL6HGpAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 创建画板\n",
    "fig = plt.figure()\n",
    "# 在fig上添加一张子图（Axes对象）\n",
    "ax1 = fig.add_subplot(111)\n",
    "# 设置子图ax1上的绘图数据，绘制柱状图\n",
    "ax1.bar(np.arange(0, 10), np.random.rand(10) * 100, label=\"temperature\")\n",
    "# 设置子图ax1的y轴标签\n",
    "ax1.set_ylabel(\"Temperature\")\n",
    "# 拿到ax1的y轴的axis对象，并设置label的坐标\n",
    "ax1.yaxis.set_label_coords(-0.1, 0.85)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cfd57767-6d7b-4da3-9a7f-e8f89bedc6ac",
   "metadata": {},
   "source": [
    "## 二、设置坐标轴上的刻度格式"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "3481151f-b193-45d0-8b49-7586fabd52cd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAD4CAYAAAAUymoqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAapUlEQVR4nO3df5BeV33f8fcHyz+R1qHSNhL64aVYoQY1kaNtEbgNJnY7ah3/mEYOwpPKajVRqhJ+2U0wKXjsqOPYDo1bY+paoFaWC8FEJbEaozrTCjEZKpQsoNiAAlHIIi9WBhlLZivGYKFP/7hn0eP1s7vPlXSf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RKb1C0HgZWSLir/3V/FDHhRYCxNLk8yo9g+LunXqDa/Ogf4r7a/OsnN6oYrgH8BPCVpX8n7TdufmbwmRRe8E/h4+R+lbwL/cpLb0zjbeyVtB75E9Zbhl5nBS5XkI8GIiKgtw1YREVFbgkdERNSW4BEREbUleERERG0JHhERUVuCR0RE1JbgERERtf1/JGTBDCzLA+EAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 创建画板\n",
    "fig = plt.figure()\n",
    "# 在fig上添加一张子图（Axes对象）\n",
    "ax1 = fig.add_subplot(111)\n",
    "# 设置子图ax1上的绘图数据，绘制柱状图\n",
    "ax1.bar(np.arange(0, 10), np.random.rand(10) * 10, label=\"temperature\")\n",
    "# 设置子图ax1的y轴标签\n",
    "ax1.set_ylabel(\"Temperature\")\n",
    "# 定义刻度格式\n",
    "formatter = ticker.FormatStrFormatter(\"$%.2f\")\n",
    "# 拿到ax1的y轴的axis对象，并设置主格式为刚才定义的formatter\n",
    "ax1.yaxis.set_major_formatter(formatter)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "40ccc38a-02b7-4fc6-bcd0-f02b6cbca0ba",
   "metadata": {},
   "source": [
    "## 三、设置坐标轴的属性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "4b13d307-f54f-43c6-a43a-abc373dab4cf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAD/CAYAAAD7X81yAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAQjklEQVR4nO3dfZAlVXnH8e/DLsvy6hpYKRR1EJSwWopKFIRoiZpA1mgkaOmtxKjEGOMbQsVgSqV8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iPYN5Je9T66uFQTq/0MeB3oj1cOxi4i0F+arIFLYF2KGYT7Rj0XcDJDPK0yRalotppka8EngE8DPjn4fTBurUf4B+hHYpaDXyoF/s9Qv8Cvq+a+Crt4fmJw8N49UETK4GcMbOofu002QOAa+832aCHDPi+aGJFr/7IJRnwklSr/syikaSeMeAlqVIGvCRVyoCXpEoZ8JJUKQNekiplwEtSpf4fLJelgABfizwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 创建画板\n",
    "fig = plt.figure()\n",
    "# 在fig上添加一张子图（Axes对象）\n",
    "ax1 = fig.add_subplot(111)\n",
    "# 设置子图ax1上的绘图数据，绘制柱状图\n",
    "ax1.bar(np.arange(0, 10), np.random.rand(10) * 10, label=\"temperature\")\n",
    "# 设置子图ax1的y轴标签\n",
    "ax1.set_ylabel(\"Temperature\")\n",
    "\n",
    "# 拿到ax1的x轴的axis对象，获取上面所有刻度文本对象\n",
    "xTickLabels = ax1.xaxis.get_ticklabels()\n",
    "# 遍历设置每个刻度文本的属性\n",
    "for label in xTickLabels:\n",
    "    label.set_color(\"orange\")  # 设置文本颜色\n",
    "    label.set_rotation(30)  # 设置文本旋转角度\n",
    "    label.set_fontsize(14)  # 设置文本大小\n",
    "\n",
    "# 拿到ax1的y轴的axis对象，获取上面所有刻度线对象\n",
    "yTickLines = ax1.yaxis.get_ticklines()\n",
    "for line in yTickLines:\n",
    "    line.set_c(\"orange\")  # 设置刻度线颜色\n",
    "    line.set_markeredgewidth(6)  # 设置刻度线宽度\n",
    "    line.set_markersize(10)  # 设置刻度线长度"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
